<!DOCTYPE html>
<html>
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    

    <title>培训管理系统 - 课时费流程审批</title>

    <link href="../css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
    <link href="../css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
    <link href="../css/animate.min.css" rel="stylesheet">
    <link href="../css/style.min.css?v=3.2.0" rel="stylesheet">

    <!-- 全局js -->
    <script src="../js/jquery-2.1.1.min.js"></script>
    <script src="../js/bootstrap.min.js?v=3.4.0"></script>

    <!-- jqgrid-->
    <link href="../css/plugins/jqgrid/ui.jqgrid.css" rel="stylesheet">
    	
    <style>
    .navbar-header{ width:150px; }
    .top-navigation .navbar-nav .open .dropdown-menu > li > a, .top-navigation .navbar-nav .open .dropdown-menu .dropdown-header
    {padding:5px 15px 5px 20px;}
    </style>
</head>
	<body class="gray-bg top-navigation">
    <div id="wrapper">
        <div id="page-wrapper" class="gray-bg">
            <div class="row border-bottom white-bg">
                <nav class="navbar navbar-static-top" role="navigation">
                    <div class="navbar-header">
                        <button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
                            <i class="fa fa-reorder"></i>
                        </button>
                        <a href="../index.html" class="navbar-brand">LOGO</a>
                    </div>
                    <div class="navbar-collapse collapse" id="navbar">
                        <script>
                            $(function () {
                                $("#navbar").load('/ts/navbar.html');
                            });
                        </script>
                    </div>
                </nav>
            </div>
            <div class="wrapper wrapper-content">
		        <div class="row">
		            <div class="col-sm-12">
		                <div class="ibox float-e-margins">
		                    <div class="ibox-title">
		                        <h5>课时费流程审批</h5>
		                    </div>
		                    <div class="ibox-content">
                				<div class="">
		                            <!--<a onclick="fnClickAddRow();" href="javascript:void(0);" class="btn btn-primary ">新增</a>-->
		                        </div>
								<div class="jqGrid_wrapper">
			                        <table id="table_list_1"></table>
			                        <div id="pager_list_1"></div>
			                    </div>
			                    
                    		</div>
                    	</div>
                    </div>
                </div>

            </div>
        </div>
    </div>    
    
	<!-- Peity -->
    <script src="../js/plugins/peity/jquery.peity.min.js"></script>

    <!-- jqGrid -->
    <script src="../js/plugins/jqgrid/i18n/grid.locale-cn.js"></script>
    <script src="../js/plugins/jqgrid/jquery.jqGrid.min.js"></script>

    <!-- 自定义js -->
    <script src="../js/content.min.js?v=1.0.0"></script>

    <!-- Page-Level Scripts -->
    <script>
        $(document).ready(function(){
        	$.jgrid.defaults.styleUI="Bootstrap";
        	var a=[{id:"1",name:"张一水",sdate:"2018-07-01",edate:"2018-09-01",xueshi:"10学时",coursename:"学开飞机",coursesubject:"飞上天空",courseno:"no.000999",address:"培训中心A1012",studynum:"19",studymoney:"12000",issubmit:"1",issend:"0",state:0},
        		   {id:"2",name:"李下水",sdate:"2018-07-01",edate:"2018-09-01",xueshi:"10学时",coursename:"学开飞机2",coursesubject:"飞上天空",courseno:"no.000999",address:"培训中心A1012",studynum:"19",studymoney:"12000",issubmit:"1",issend:"0",state:1},
        		   {id:"3",name:"吴法天",sdate:"2018-07-01",edate:"2018-09-01",xueshi:"10学时",coursename:"学开飞机3",coursesubject:"飞上天空",courseno:"no.000999",address:"培训中心A1012",studynum:"19",studymoney:"12000",issubmit:"1",issend:"0",state:2},
        		   {id:"4",name:"吴法地",sdate:"2018-07-01",edate:"2018-09-01",xueshi:"10学时",coursename:"学开飞机3",coursesubject:"飞上天空",courseno:"no.000999",address:"培训中心A1012",studynum:"19",studymoney:"12000",issubmit:"1",issend:"0",state:3},
        		   {id:"5",name:"吴大天",sdate:"2018-07-01",edate:"2018-09-01",xueshi:"10学时",coursename:"学开飞机3",coursesubject:"飞上天空",courseno:"no.000999",address:"培训中心A1012",studynum:"19",studymoney:"12000",issubmit:"1",issend:"0",state:4},
        		   {id:"6",name:"汪天",sdate:"2018-07-01",edate:"2018-09-01",xueshi:"10学时",coursename:"学开飞机3",coursesubject:"飞上天空",courseno:"no.000999",address:"培训中心A1012",studynum:"19",studymoney:"12000",issubmit:"1",issend:"0",state:5},
				  ];
        	$("#table_list_1").jqGrid({
        		data:a,
        		datatype:"local",
        		height:450,
        		autowidth:true,
        		shrinkToFit:true,
        		rowNum:14,
        		rowList:[10,20,30],
        		//colNames:["序号","日期","姓名","部门","首课必听","类型","奖惩情况","聘期","操作"],
        		//序号、教员姓名、工号、上课开始时间、上课结束时间、培训学时、课程名称、课程主题、计划批次编号、培训地点、参训人数、课时费数额、是否提交流程、是否发放
        		colModel:[
        			{label:'序号',name:"id",index:"id",width:60,sorttype:"int"},
        			{label:'教员姓名',name:"name",index:"name",align:"center"},
        			{label:'上课开始时间',name:"sdate",index:"invdate",sorttype:"date",formatter:"date"},
        			{label:'上课结束时间',name:"edate",index:"invdate",sorttype:"date",formatter:"date"},
        			{label:'培训学时',name:"xueshi",index:"amount",align:"center"},
        			{label:'课程名称',name:"coursename",index:"invdate",align:"center"},
        			{label:'课程主题',name:"coursesubject",index:"invdate",align:"center"},
        			{label:'计划批次编号',name:"courseno",index:"invdate",align:"center"},
        			{label:'培训地点',name:"address",index:"invdate",align:"center"},
        			{label:'参训人数',name:"studynum",index:"invdate",align:"center"},
        			{label:'课时费数额',name:"studymoney",index:"invdate",align:"center"},
        			{label:'是否提交流程',name:"issubmit",index:"invdate",align:"center",
        				formatter: function (cellvalue, options, rowObject) {return cellvalue==0?"否":"是"}
        			},
        			{label:'是否发放',name:"issend",index:"ismustlisten",align:"center",
        				formatter: function (cellvalue, options, rowObject) {return cellvalue==0?"否":"是"}
	        		},
	        		{label:'状态',name:"state",index:"invdate",align:"center",
        				formatter: function (cellvalue, options, rowObject) {
        					//培训工程师发起→培训主管工程师（或主任工程师）校核→培训总经理审批→飞机维修工程部副总经理（分管培训的副总经理）
        					if(cellvalue==0){
        						return "正常"
        					}else if(cellvalue==1){
        						return "发起中，待校核"
        					}else if(cellvalue==2){
        						return "已校核，待审批"
        					}else if(cellvalue==3){
        						return "已审批，待最终通过"
        					}else if(cellvalue==4){
        						return "审批完成"
        					}else if(cellvalue==5){
        						return "审批失败"
        					}
        					return ""
        				}
    				},
    				{label:'操作', name: '', index: 'operate', align: 'center',width:250,sortable:false,
	                    formatter: function (cellvalue, options, rowObject) {
	                        var detail="<a onclick='btn_detail(\""+ rowObject.id + "\")'' title='审核通过' style='padding:0px 5px'>审核通过</a>"	                        
	                        		+  "<a onclick='btn_detail(\""+ rowObject.id + "\")'' title='退回申请' style='padding:0px 5px'>退回申请</a>";
	                        return detail;
	                    }
	                },
    			],
        		pager:"#pager_list_1",
        		viewrecords:true,
        		//caption:"jqGrid 示例1",
        		hidegrid:false
        	});
    	});
    </script>

    
    
	</body>
</html>
